/**
 * @author:linjiye
 * @date: 2024/01/14
 * @desc: AI原创模块接口定义
 **/

import {createApi} from "@reduxjs/toolkit/query/react";
import useBaseQuery from "@/hooks/useBaseQuery";
import { stringify } from "qs";

export const morePlatformsApi = createApi({
    reducerPath:'morePlatformsApi',
    baseQuery:useBaseQuery('mm'),
    endpoints(build) {
        return {
            // http://192.168.200.122:3200/jeecgboot/mm/aicreation/getSummaryFromUrl?url=https%3A%2F%2Fwww.zhihu.com%2Fquestion%2F55127457%2Fanswer%2F3470555669
            getSummaryFromUrl:build.mutation({
                query:(data:any) => {
                    return {
                        url: 'aicreation/getSummaryFromUrl',
                        method:"post",
                        body:data,
                        openErrMessage: true
                    }
                },
            }),
        }
    }
});

export const {
    useGetSummaryFromUrlMutation
} = morePlatformsApi;
